@import url("../../utilities.css");

.comment_container {
  display: flex;
  flex-direction: column;
  height: auto;
  margin-top: 10px;
}

.reply-navigation {
  margin-bottom: 22px;

  .nav-bar {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;

    .nav-title {
      display: flex;
      align-items: center;
      width: 114px;
      font-size: 18px;

      .nav-title-text {
        font-weight: 500;
      }

      .total-reply {
        margin: 0 36px 0 6px;
        color: #9499a0;
        font-weight: normal;
        font-size: 13px;
      }
    }

    .nav-sort {
      display: flex;
      align-items: center;
      color: #9499a0;
      font-size: 13px;

      .nav-item {
        cursor: pointer;

        &:hover {
          color: #8c979c;
        }

        &:last-child::after {
          display: none;
        }

        &::after {
          content: " ";
          display: inline-block;
          height: 10px;
          width: 1px;
          margin: -1px 12px;
          background-color: #9499a0;
        }
      }

      .nav-item.active {
        color: #18191c;
      }
    }
  }
}

.reply-wrap {
  position: relative;
}

.box-normal {
  display: flex;
  transition: 0.2s;

  .reply-box-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 50px;
  }

  .reply-box-wrap {
    display: flex;
    position: relative;
    flex: 1;

    .reply-box-textarea {
      width: 100%;
      height: 50px;
      padding: 5px 10px;
      box-sizing: border-box;
      color: #181931;
      font-family: inherit;
      line-height: 38px;
      background-color: #f1f2f3;
      border: 1px solid #f1f2f3;
      border-radius: 6px;
      outline: none;
      resize: none;
      transition: 0.2s;

      &::placeholder {
        color: #9499a0;
        font-size: 12px;
      }

      &:focus {
        height: 60px;
        background-color: #fff;
        border-color: #c9ccd0;
      }
    }
  }

  .reply-box-send {
    position: relative;
    display: flex;
    flex-basis: 86px;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;

    & .send-text {
      position: absolute;
      z-index: 1;
      color: #fff;
      font-size: 16px;
    }

    &::after {
      position: absolute;
      width: 100%;
      height: 100%;
      background-color: #636d6f;
      border-radius: 4px;
      opacity: 0.5;
      content: "";
    }

    &:hover::after {
      opacity: 1;
    }
  }
}

.bili-avatar {
  margin: auto;
  position: relative;
  display: block;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
}

.bili-avatar-img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: none;
  border-radius: 50%;
  image-rendering: -webkit-optimize-contrast;
  transform: translate(-50%, -50%);
}

.reply-list {
  margin-top: 14px;
  height: 300px; 
  overflow-y: scroll; 
  scrollbar-width: none; 
  -ms-overflow-style: none;
}

.reply-list::-webkit-scrollbar {
  display: none;
}

.reply-item {
  display: flex;

  .root-reply-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 50px;
  }

  .content-wrap {
    position: relative;
    flex: 1;

    &::after {
      content: " ";
      display: block;
      height: 1px;
      width: 100%;
      margin-top: 14px;
      background-color: #e3e5e7;
    }

    .user-info {
      display: flex;
      flex-direction: column;
      margin-bottom: 4px;

      .user{
        margin-right: auto;
        position: relative;
        align-items: center;

        .user-name {
          height: 30px;
          margin-right: 5px;
          color: #61666d;
          font-size: 15px;
          font-weight: bold;
          line-height: 30px;
          cursor: pointer;
        }
      }
      .reply {
        margin-right: auto;
        position: relative;
        align-items: center;
        margin-top: 2px;
        color: #9499a0;
        font-size: 13px;

        .reply-time {
          width: 86px;
          margin-right: 20px;
          cursor: pointer;
        }
      }
    }

    .root-reply {
      position: relative;
      padding: 2px 0;
      color: #181931;
      font-size: 15px;
      line-height: 24px;

      .reply-info {
        position: relative;
        display: flex;
        flex-direction: row;
        align-items: center;
        margin-top: 2px;
        color: #9499a0;
        font-size: 13px;
        
        .like{
          background: url("/src/pictures/comment/unlike.svg") no-repeat center center / contain;
          width: 30px;
          height: 20px;
          cursor: pointer;
        }
        
        .like.liked {
          background: url("/src/pictures/comment/like.svg") no-repeat center center / contain;
        }

        .tread{
          background: url("/src/pictures/comment/unlike.svg") no-repeat center center / contain;
          transform: rotateX(180deg);
          width: 70px;
          height: 20px;
          cursor: pointer;
        }
        
        .tread.treaded {
          background: url("/src/pictures/comment/like.svg") no-repeat center center / contain;
          transform: rotateX(180deg);
        }

        .reply{
          background: url("/src/pictures/comment/reply.svg") no-repeat center center / contain;
          width: 30px;
          height: 18px;
          cursor: pointer;
        }

        .more{
          margin-left: auto;
          background: url("/src/pictures/comment/more.svg") no-repeat center center / contain;
          width: 40px;
          height: 30px;
          cursor: pointer;
        }
        .popup {
          position: absolute;
          top: 0;
          left: 94%; 
          background: white;
          border: 1px solid #ccc;
          padding: 5px;
          white-space: nowrap; 
          z-index: 10; 
        }
        
        .delete, .report {
          cursor: pointer;
        }
        
        .delete:hover, .report:hover {
          background: #f5f5f5;
        }
      }
    }
  }
}

@media (prefers-color-scheme: dark) {
  /* add colors in darkmode here */
}
